package middleware

import (
	"net/http"
)

type UserAgentMiddleware struct {
}

func NewUserAgentMiddleware() *UserAgentMiddleware {
	return &UserAgentMiddleware{}
}

func (m *UserAgentMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		// TODO generate middleware implement function, delete after code implementation
		//token := r.Header.Get("token")
		//if token == "" {
		//	response := types.Response{
		//		Code:    500,
		//		Message: "未登录",
		//		Data:    nil,
		//	}
		//
		//}
		// Passthrough to next handler if need
		next(w, r)
	}
}
